package com.example.rbac.mapper;

import com.example.rbac.entity.Menu;
import com.example.rbac.entity.RoleMenu;
import com.example.rbac.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Administrator on 2017/10/12.
 */
@Mapper
public interface MenuMapper extends CurdMapper<Menu>{
    List<String> findMenuByRoleId(List<String> list);

    List<Menu> findMenuByMenuId(List<String> list);

    List<Menu> findList();

    Integer deleteMenuById(String id);

    List<Menu> findMenuByUserId(String id);

    Integer insertByPermission(List<RoleMenu> roleMenus);

    Integer updateByPermission(@Param("roleId") String roleId, @Param("list") List<RoleMenu> roleMenus);

    List<Menu> findMenuListByRoleId(String id);

    Menu getMenuByUrl(String url);

    Integer updateBySort(List<Menu> list);
}
